Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: support enabled options when building seastar-module #2252

Merged
merged 3 commits into from
May 19, 2024

Conversation

tchaikov
Copy link
Contributor

before this change, when building seastar-module, we don't check for
the enabled features. so, for instance io uring backend is not enabled
even Seastar_IO_URING is set.

in this series we

  • move add_subdirectory(src) down
  • #include the used header files
  • check for the enabled options,
  • link against the related libraries, and
  • add the required macro definitions

this should enable seastar-module to build with, for instance, io_uring
backend enabled. as SEASTAR_HAVE_URING enables this backend when
building src/core/reactor_backend.cc.

Fixes #2249

tchaikov added 3 commits May 19, 2024 12:27
so we can have access to the Seastar_PRIVATE_CXX_FLAGS when
defining the `seastar-module` target. we will do this in another
commit.

Signed-off-by: Kefu Chai <[email protected]>
before this change, when building with C++20 modules enabled, some
symbols are not accessible, when compiling source files like
src/core/resource.cc if some features are enabled using macros like
SEASTAR_HAVE_HWLOC and SEASTAR_HAVE_URING.

in this change, we include the missing headers or move the include
precessor directives, so that the .cc files can have access to the
used declaration of the used symbols.

please note, this change not only enables us to build C++20 modules
with SEASTAR_HAVE_HWLOC and/or SEASTAR_HAVE_URING defined, it is also
necessary also from the correctness point of view.

Signed-off-by: Kefu Chai <[email protected]>
before this change, when building seastar-module, we don't check for
the enabled features. so, for instance io uring backend is not enabled
even `Seastar_IO_URING` is set.

in this change we

* check for the enabled options,
* link against the related libraries, and
* add the required macro definitions

this should enable seastar-module to build with, for instance, io_uring
backend enabled. as `SEASTAR_HAVE_URING` enables this backend when
building `src/core/reactor_backend.cc`.

Fixes scylladb#2249
Signed-off-by: Kefu Chai <[email protected]>
@tchaikov tchaikov added the build build system label May 19, 2024
@avikivity avikivity closed this in 855fc4b May 19, 2024
@avikivity avikivity merged commit 855fc4b into scylladb:master May 19, 2024
12 of 13 checks passed
@tchaikov tchaikov deleted the cxx-modules branch May 22, 2024 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

io_uring reactor backend not available when importing and using seastar as a module
2 participants